<include file="Public:head" title='短信配置' />
<script>
    function joinShorts(url) {
        if (url == '') {
            url = "__APP__/Admin/Box/joinShorts";
        }
        $.post(url, {
        }, function(data) {
            $('#mainbox2').html(data);
            showbgbox3('#mainbox2', 0, 0);
            $(".page a").click(function() {
                var href = $(this).attr("data-href");
                choseShop(href);
            })
        })
    }
</script>
<div class="main-container" id="main-container">
    <div class="main-container-inner">
        <include file="Public:left" />
        <div class="main-content">
            <div class="breadcrumbs" id="breadcrumbs">
                <ul class="breadcrumb">
                    <li><i class="icon-home home-icon"></i><a href="__APP__/{$Think.MODULE_NAME}">首页</a></li>
                    <li><a href="{:U('Communications/shorts')}">短信管理</a></li>
                    <li class="active">短信配置</li>
                </ul>
            </div>
            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="row">
                            <div class="col-xs-12">
                                <h3 class="header smaller lighter blue">短信配置</h3>

                                <form action="{:U('Communications/shorts_set_post')}" method="POST" id="form">
                                    <table class="table table_detail">
                                        <tbody>

                                             <tr class="pay_title pay_select" >
                                        <td colspan='2' style='padding-left: 12px;font-size: 14px'><strong>基本设置</strong></td>
                                    </tr>
                                    <tr class="a1">
                                        <td class="td_left">开启状态</td>
                                        <td width="80%" align="left" style="text-align:left">
                                            <label><input name="is_start" type="radio" value="1" <if condition="$detail.is_start eq 1">checked</if> /> 开启</label>
                                            <label><input   name="is_start" type="radio"   value="0" <if condition="$detail.is_start eq 0">checked</if>/> 关闭</label>
                                        </td>
                                    </tr>


                                    <tr class="a1" >
                                        <td class="td_left">短信账号</td>
                                        <td width="80%" align="left" style="text-align:left">
                                            <input type="text"  id="account" style="width:250px"  value="{$detail.account}" name="account" autocomplete="off"/>
                                        </td>
                                    </tr>
                                    

                                    <tr  class="a1" >
                                        <td class="td_left">短信密码</td>
                                        <td width="80%" align="left" style="text-align:left">
                                            <input type="password" id="password" style="width:250px"  name="pwd" value=""autocomplete="off"/>
                                        </td>
                                    </tr>
                                    <tr class="pay_title pay_select" >
                                        <td colspan='2' style='padding-left: 12px;font-size: 14px'><strong>下单成功</strong></td>
                                    </tr>
<!--                                    <tr class="a1" >
                                        <td class="td_left">开启规则</td>
                                        <td width="80%" align="left" style="text-align:left">
                                            <label><input type="radio" name="users" value="0" autocomplete="off" <if condition="$detail.users eq 0">checked</if>/>全部用户</label>
                                            <label><input type="radio" name="users" value="1"  autocomplete="off" <if condition="$detail.users eq 1">checked</if>/>已加入队列用户</label>
                                            <a onclick="joinShorts('')">(<span class="red"style="text-decoration: none"id="num">{$num}</span>)</a>
                                        </td>
                                    </tr>
                                    <tr class="a1" >
                                        <td class="td_left"></td>
                                        <td width="80%" align="left" style="text-align:left">
                                <input type="checkbox" name="is_auto" value="1" class="radio" autocomplete="off" <if condition="$detail.is_auto eq 1">checked</if>/> 自动加入队列
                                <p class="red">管理员审核订单成功后，该用户自动加入短信队列</p>
                                </td>
                                </tr>-->
                                <tr class="a1" >
                                    <td class="td_left">接受短信号码</td>
                                    <td width="80%" align="left" style="text-align:left">
                                        <input type="text"  id="phones" style="width:250px"  value="{$detail.phones}" name="phones" autocomplete="off"/>
                                        <p class="red">用户下完单，该手机号都可以收到短信。（多个手机号码以英文逗号,隔开;默认接受号码为商家手机号码）</p>
                                    </td>
                                </tr>
                                <tr class="a1">
                                    <td class="td_left">发送方式</td>
                                    <td width="80%" align="left" style="text-align:left">
                                        <label>
                                            <input checked="checked" value="0"   name="send_method" type="radio"
                                                   <if condition="$detail.send_method eq 0">checked</if>/> 用户下完单
                                        </label>
                                        <label>
                                            <input name="send_method" type="radio" value="1"  <if condition="$detail.send_method eq 1">checked</if>  /> 审核完成
                                        </label>
                                     <p class="red">用户下完单 表示用户下单成功后 商家或者管理员将立即收到短信。</p> 
                                        <p class="red">审核完成 表示用户下完订单 需要管理员审核完成发送短信</p> 
                                    </td>
                                </tr>


                                <tr id="my_downOrder" class="a1">
                                    <td class="td_left">下单成功短信内容</td>
                                    <td width="80%" align="left" style="text-align:left">
                                        <textarea  class="a1" rows="4"   name="send_suc"  style="overflow:hidden; width:70%;font-size: 13px;padding:5px;">{$detail.send_suc}</textarea>
                                        <p style="color:#FF0000; font-weight:bold"></p>
                                    </td>
                                </tr>
                                <tr  class="a1">
                                    <td class="td_left">次数限制(一天)</td>
                                    <td width="80%" align="left" style="text-align:left">
                                        <input type="text"  id="send_suc_times" style="width:250px"  value="{$detail.send_suc_times}" name="send_suc_times" autocomplete="off"/> 次
                                        <p class="red">0为不限制</p>
                                    </td>
                                </tr>
                                <tr class="pay_title pay_select" >
                                    <td colspan='2' style='padding-left: 12px;font-size: 14px'><strong>手机绑定</strong></td>
                                </tr>
                                <tr  class="a1">
                                    <td class="td_left">手机绑定短信内容</td>
                                    <td width="80%" align="left" style="text-align:left">
                                        <textarea  class="a1" rows="2" id="phone_bind" name="phone_bind"  style="overflow:hidden; width:70%">{$detail.phone_bind}</textarea>
                                    </td>
                                </tr>
                                <tr  class="a1">
                                    <td class="td_left">次数限制(一天)</td>
                                    <td width="80%" align="left" style="text-align:left">
                                        <input type="text"  id="phone_bind_times" style="width:250px"  value="{$detail.phone_bind_times}" name="phone_bind_times" autocomplete="off"/> 次
                                        <p class="red">0为不限制</p>
                                    </td>
                                </tr>
                              <tr class="pay_title pay_select" >
                                    <td colspan='2' style='padding-left: 12px;font-size: 14px'><strong>催单</strong></td>
                                </tr>
                                <tr  class="a1">
                                    <td class="td_left">接受者</td>
                                    <td width="80%" align="left" style="text-align:left">
                                        <label>
                                            <input name="order_find_receiver[]" type="checkbox" value="1"  autocomplete="off" {$detail.order_find_receiver|getChecked=###,1}  /> 商家
                                        </label>
                                        <label>
                                            <input name="order_find_receiver[]" type="checkbox" value="2" autocomplete="off" {$detail.order_find_receiver|getChecked=###,2}  /> 管理员
                                        </label>
                                    </td>
                                </tr>
                                <tr class="pay_title pay_select" >
                                    <td colspan='2' style='padding-left: 12px;font-size: 14px'><strong>订单取消</strong></td>
                                </tr>
                                <tr  class="a1">
                                    <td class="td_left">取消短信内容</td>
                                    <td width="80%" align="left" style="text-align:left">
                                        <textarea  class="a1" rows="2" id="order_cancel" name="order_cancel"  style="overflow:hidden; width:70%">{$detail.order_cancel}</textarea>
                                    </td>
                                </tr>
                                
                               
                                <tr class="pay_title pay_select" >
                                    <td colspan='2' style='padding-left: 12px;font-size: 14px'><strong>备注</strong></td>
                                </tr>
                                <tr>
                                    <td class="td_left">标签对应</td>
                                    <td style="text-align:left;" colspan="4">
                                        用户姓名：{truename}<br>
                                        用户手机：{phone}<br>
                                        用户电话：{phone2}<br>
                                        用户地址：{addr}<br>
                                        商 家 名：{shopname}<br>
                                        下单时间：{addtime}<br>
                                        下单内容：{content}<br>
                                        下单备注：{remark}<br>
                                        订 单 号：{ordernum}<br>
                                        订单金额：{realMoney}<br>

                                        <p style="color:#FF0000">邮箱示例：尊敬的{shopname}：用户{truename}在{addtime}购买了{content},{remark},手机：{phone},地址：{addr}。
                                            <br>邮箱内容：尊敬的炫迈酒店：用户黄金林在10:30购买了鸡翅一份、汉堡两份,11:30送出,手机：18252088547,地址：南理工1147。</p>

                                    </td>
                                </tr>
                                            <tr>
                                                <td class="td_left"></td>
                                                <td>
                                                    <button class="btn btn-info btn-sm" type="submit">
                                                        <i class="icon-ok bigger-110 "></i>
                                                        保 存
                                                    </button>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <include file="Public:setting" />
    </div>
</div>
<include file="Public:foot" />